// 转为以万为单位的数字
const toTenThousand = (num:number) => {
  return (num / 10000).toFixed(1)
}

// 将时间戳转为年月日
const timer = (time:number) => {
  const date = new Date(time);
  const Y = date.getFullYear() + '-';
  const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  return Y + M + D;
}
export default {
  toTenThousand,
  timer
}
